﻿{$header}<div id="main" class="main" >
    <div class="content">
        <h3 class="heading">编辑货品 [ <a href="javascript:history.back()">返回列表</a> ]</h3>
  <form class="form-horizontal well" method='post' id="form1" action="__URL__/update/">
<div id="result" class="result none"></div>
<table cellpadding=3 cellspacing=3 >
<tr>
    <td class="tRight" >名称：</td>
    <td class="tLeft" >
            <input type="text" name="name" value="{$vo.name}" class="input-xxlarge" >
        </td>
</tr>
<tr>
    <td>所属产品</td>
    <td>{$vo.common_id|getModelName='Common_product'}</td>
</tr>
<tr>
    <td>修改产品</td>
    <td>
    <input id="common" name="common_id" style="width:500px" value="{$vo.common_id}" > <span class="alert alert-info">不修改，则不动</span>
    
    </td>
</tr>
<tr>
    <td>商品机器编码</td>
    <td>{$vo.pnumber}  
<input id="" name="is_update_mano" type="checkbox" />是否更新编码  </td>
</tr>
<tr>
    <td>品牌</td>
    <td>{$vo.brand_id|getModelName='Brand'}</td>
</tr>


<tr>
    <td>规格</td>
    <td>
        {$vo.id|printGoodsOption}
    </td>
</tr>
<tr>
    <td>修改规格</td>
    <td>
        <?php $detail = getGoodsDetail($vo['id']);
        $poption = $detail['option'];
        $lens_mano = "";
        $color_mano = "";
        foreach ($poption as $key => $value) {
            if($value['option'] == "光度" )
                $lens_mano = $value['mano'];
            if($value['option'] == "颜色" )
                $color_mano = $value['mano'];
        }
         ?>
    <volist name="mod_options" id ="os" >
     {$os.name}:
     <php>
     $values= M('Option_value')->where('option_id ='.$os['id'])->order('name')->findAll();
     </php>
      <select name="mano[]" >
      <option value="">请选择规格值</option> 
       <volist name="values" id = "val">
          <option value="{$val.mano}" <eq name="lens_mano" value="$val.mano">selected</eq> <eq name="color_mano" value="$val.mano">selected</eq>    >{$val.name}</option> 
       </volist>
     </select><br>
     </volist>
    </td>
</tr>
<tr>
	<td class="tRight" >注册证号：</td>
	<td class="tLeft" >
            <input type="text" name="regcode" value="{$vo.regcode}" class="input-xxlarge">
        </td>
</tr>
<tr>
	<td class="tRight" >人工编码：</td>
	<td class="tLeft" >
            <input type="text" name="helpword" value="{$vo.helpword}" class="large">默认拼音首字母，方便快速查询
        </td>
</tr>
<tr>
	<td class="tRight" >条形码(暂作为德生堂编码)：</td>
	<td class="tLeft" >
            <input type="text" name="tm" value="{$vo.tm}" class="large">
        </td>
</tr>
<tr>
	<td class="tRight" >类别：</td>
        <td class="tLeft" >
            <select name="cat_id">
                <option value="0" selected >无上级分类</option>
                <volist name="cate_list" id="list">
                    <option value="{$list.id}" <eq name="vo.cat_id" value="$list.id">selected</eq> >{$list.level}{$list.name}</option>
                </volist>
            </select>
        </td>
</tr>
<tr>
	<td class="tRight" >单位：</td>
	<td class="tLeft" >
            <select name="unit_id">
                <option value="-1">--请选择单位--</option>
                <volist name="units" id="ut">
                    <option value="{$key}" <eq name="vo.unit_id" value="$key">selected</eq> >{$ut}</option>
                </volist>
            </select>
        </td>
</tr>
<tr>
    <td>默认仓库</td>
    <td>{:modList('Warehouse',$vo['warehouse_id'],'span2','warehouse_id')}</td>
</tr>
<tr>
	<td class="tRight" >默认供应商：</td>
	<td class="tLeft" >
            <select name="supplier_id_default">
                <option value="-1">--请选择供应商--</option>
                <volist name="suppliers" id="sp">
                    <option value="{$key}" <eq name="vo.supplier_id_default" value="$key">selected</eq> >{$sp}</option>
                </volist>
            </select>
        </td>
</tr>
<tr>
	<td class="tRight" >默认进价：</td>
	<td class="tLeft" >
            <input type="text" name="cost_default" value="{$vo.cost_default}" class="large">
        </td>
</tr>
<tr>
	<td class="tRight" >默认零售价：</td>
	<td class="tLeft" >
            <input type="text" name="sale_price_default" value="{$vo.sale_price_default}" class="large">
        </td>
</tr>
<tr>
	<td class="tRight" >默认批发价：</td>
	<td class="tLeft" >
            <input type="text" name="wholesale_price_default" value="{$vo.wholesale_price_default}" class="large">
        </td>
</tr>
<tr>
	<td class="tRight" >库存报警点：</td>
	<td class="tLeft" >
            <input type="text" name="minstock" value="{$vo.minstock}" class="small">默认为0，无限制
        </td>
</tr>
<tr>
    <td>仓位</td>
    <td><input type="text" name="location" value="{$vo.location}" /></td>
</tr>
<tr>
	<td class="tRight tTop">备注：</td>
	<td class="tLeft"><textarea class="large bLeft"  name="remark" style="width:650px;height:100px;">{$vo.remark}</textarea></td>
</tr>
<tr>
    <td class="tRight">是否虚拟物品：</td>
        <td class="tLeft">
            <SELECT class="small bLeft"   name="is_virtual">
                <option <eq name="vo.is_virtual" value="1" >selected</eq> value="1">是</option>
                <option <eq name="vo.is_virtual" value="0" >selected</eq> value="0">否</option>
            </SELECT>
        </td>
</tr>
<tr>
	<td class="tRight">状态：</td>
        <td class="tLeft">
            <SELECT class="small bLeft"   name="status">
                <option <eq name="vo.status" value="1" >selected</eq> value="1">启用</option>
                <option <eq name="vo.status" value="0" >selected</eq> value="0">禁用</option>
            </SELECT>
        </td>
</tr>
<tr>
<td>操作时间</td>
<td>创建时间：{$vo.create_time|toDate} 修改时间：{$vo.update_time|toDate} </td>
</tr>
<tr>
	<td></td>
	<td class="center" width="300">
        <input type="hidden" value="{$vo.id}" name="id">
	<button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> 保存</button>
	<button type="reset" onclick="javascript:history.back()" class="btn btn-primary offset1"><i class="icon-arrow-left icon-white"></i> 返回</button>
	</td>
</tr>
</table>
</form>
</div>
</div>
<include file="Public:footer" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Js/easyui/themes/default/easyui.css">
<script type="text/javascript" src="__PUBLIC__/Js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/filter-product.js"></script>
